<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>angular的循环标签</title>
		<script type="text/javascript" src="../js/angular.min.js" ></script>
	</head>
	<body ng-app="myapp" ng-controller="myctr">
		<table width="80%" border="1px">
			<tr>
				<th>序号</th>
				<th>商品编号</th>
				<th>商品名称</th>
				<th>价格</th>
			</tr>
			<tr ng-repeat="product in products">
				<td><center>{{$index+1}}</td>
				<td><center>{{product.id}}</td>
				<td><center>{{product.name}}</td>
				<td><center>{{product.price}}</td>
			</tr>
		</table>
	</body>
	<script>
		var myapp = angular.module("myapp",[]);
		myapp.controller("myctr",["$scope",function($scope){
			$scope.products=[
				{
					id:1001,
					name:'ps4',
					price:3999					
				},
				{
					id:1002,
					name:'xbox360',
					price:3888	
				}
			];
		}]);
	</script>
</html>
